/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package siasdit;

import net.sigawe.SIASDIT.ProgUtama.Engine;

/**
 *
 * @author yoze
 */
public class Main {
public Main() {

//        Message msg = new Message();
//        msg.setPhoneNumber("1234");
          new Engine();
                    

//        lihat harga berdasar warung makan -ok
//        try {
//            WrmknDAO wr = new WrmknDAO(DBConnection.getInstance().getCon());
//            List<Wrmkn> lsit = wr.getAllNama("kadipiro");
//            Wrmkn w = lsit.get(0);
//            List<Menu> list = w.getList();
//            System.out.println("Nama warung makan :" + w.getNama_wrmkn());
//            for (Menu x : list) {
//                System.out.println("Menu  :" + x.getBarang().getNama());
//                System.out.println("Harga  :" + x.getHarga());
//            }
//        } catch (SQLException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }

        //melihat nama warung berdasarkan alamat -ok
//        try {
//            WrmknDAO wr = new WrmknDAO(DBConnection.getInstance().getCon());
//            List<Wrmkn> w = wr.getAllAlamat("solo");
//            System.out.println(w.size());
//            for (Wrmkn x : w) {
//                System.out.println("Nama : " + x.getNama_wrmkn());
//                System.out.println("Alamat : " + x.getAlamat());
//            }
//        } catch (SQLException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }

        //melihat alamat berdasarkan nama makanan -ok
//        try {
//            BarangDAO br = new BarangDAO(DBConnection.getInstance().getCon());
//            Barang b = br.load("gudeg ayam");
////            System.out.println("Nama Makanan : "+b.getNama());
//            WrmknDAO c = new WrmknDAO(DBConnection.getInstance().getCon());
//            List<Wrmkn> w = c.getAllBarang(b);
//            for (Wrmkn x : w){
//                System.out.println("Nama Warung Makan : "+x.getNama_wrmkn());
//                System.out.println("Alamat : Jalan "+x.getAlamat());
//            }
//        } catch (SQLException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }




        //melihat nama warung berdasarkan alamat -ok
//        try {
//            WrmknDAO wr = new WrmknDAO(DBConnection.getInstance().getCon());
//            List<Wrmkn> w = wr.getAllAlamat("timoho");
//            System.out.println(w.size());
//            for (Wrmkn x : w) {
//                System.out.println("Nama : " + x.getNama_wrmkn());
//                System.out.println("Alamat : " + x.getAlamat());
//            }
//        } catch (SQLException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }


        //melihat alamat berdasarkan nama makanan -ok
//        try {
//            BarangDAO br = new BarangDAO(DBConnection.getInstance().getCon());
//            Barang b = br.load("gudeg telur");
//            System.out.println("Nama Makanan : "+b.getNama());
//            WrmknDAO c = new WrmknDAO(DBConnection.getInstance().getCon());
//            List<Wrmkn> w = c.getAllBarang(b);
//            for (Wrmkn x : w){
//                System.out.println("Nama Warung Makan : "+x.getNama_wrmkn());
//                System.out.println("Alamat : Jalan "+x.getAlamat());
//            }
//        } catch (SQLException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }
    }
    public static void main(String args[]) {
        new Main();
    }
    
}
